<template>
  <div class="tooltip">
    <SvgIcon svg-name="error" class-name="error-svg" />
    <div class="tooltip-content">
      <span class="tooltip-content_title">{{ props.msg }}</span>
    </div>
    <SvgIcon
      v-if="props.type == 'power'"
      svg-name="arrow"
      :color="sys.color.ARROW_COLOR"
      class-name="arrow-svg"
    />
  </div>
</template>

<script setup>
import { defineProps } from 'vue'
import { sys } from '../../utils/sys'

const props = defineProps(['msg', 'type'])
</script>

<style lang="less" scoped>
@import url(../../assets/style/tooltip.less);
</style>
